﻿using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.UC.下单MTO.Service;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using DXApplicationTangche.UC.货号管理.service;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.UC.下单MTO
{
    public partial class FormMTO更多款式 : DevExpress.XtraEditors.XtraForm
    {
        public OrderCommitDTO返回 orderCommitDTO返回 = new OrderCommitDTO返回();

        public FormMTO更多款式(OrderCommitDTO返回 orderCommitDTO返回)
        {
            InitializeComponent();
            List<SaleStyleSample> saleStyleSamples = 货号管理Service.getSaleStyleSampleWithDateTime(0, 5000);
            this.gridControl更多款式.DataSource = saleStyleSamples;
            this.orderCommitDTO返回 = orderCommitDTO返回;
        }

        private void gridView更多款式_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            this.orderCommitDTO返回.build给款式信息赋值(
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "stockInventoryNo"),
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "styleNameCN"),
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "materialCode"),
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "materialDesc"),
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "materialComposition"),
                FunctionHelper.GetgridViewValue(this.gridView更多款式, this.gridView更多款式.FocusedRowHandle, "salePrice"));

            this.Close();
        }
    }
}
